package com.qys.erp.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.qys.erp.mapper.RegionMapper;
import com.qys.erp.domain.Region;
import com.qys.erp.service.IRegionService;

/**
 * 库位Service业务层处理
 * 
 * @author qys
 * @date 2021-06-19
 */
@Service
public class RegionServiceImpl implements IRegionService 
{
    @Autowired
    private RegionMapper regionMapper;

    /**
     * 查询库位
     * 
     * @param regionId 库位ID
     * @return 库位
     */
    @Override
    public Region selectRegionById(Long regionId)
    {
        return regionMapper.selectRegionById(regionId);
    }

    /**
     * 查询库位列表
     * 
     * @param region 库位
     * @return 库位
     */
    @Override
    public List<Region> selectRegionList(Region region)
    {
        return regionMapper.selectRegionList(region);
    }

    /**
     * 新增库位
     * 
     * @param region 库位
     * @return 结果
     */
    @Override
    public int insertRegion(Region region)
    {
        return regionMapper.insertRegion(region);
    }

    /**
     * 修改库位
     * 
     * @param region 库位
     * @return 结果
     */
    @Override
    public int updateRegion(Region region)
    {
        return regionMapper.updateRegion(region);
    }

    /**
     * 批量删除库位
     * 
     * @param regionIds 需要删除的库位ID
     * @return 结果
     */
    @Override
    public int deleteRegionByIds(Long[] regionIds)
    {
        return regionMapper.deleteRegionByIds(regionIds);
    }

    /**
     * 删除库位信息
     * 
     * @param regionId 库位ID
     * @return 结果
     */
    @Override
    public int deleteRegionById(Long regionId)
    {
        return regionMapper.deleteRegionById(regionId);
    }
}
